<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>孕育宝典 - 食谱推荐</title>
        <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
        <style>
            body {
                font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
                background-color: #f5f5f5;
                color: #333333;
                margin: 0;
                padding: 0;
            }
            .device-container {
                width: 390px;
                height: 844px;
                overflow: hidden;
                position: relative;
                background-color: #ffffff;
            }
            .status-bar {
                height: 44px;
                background-color: #ffffff;
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 0 20px;
                font-size: 14px;
                font-weight: 600;
            }
            .header {
                background-color: #ffffff;
                padding: 12px 16px 8px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-bottom: 1px solid #f0f0f0;
            }
            .nav-bar {
                height: 60px;
                background-color: #ffffff;
                position: absolute;
                bottom: 0;
                width: 100%;
                display: flex;
                justify-content: space-around;
                align-items: center;
                border-top: 1px solid #f0f0f0;
            }
            .nav-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                color: #666666;
                font-size: 10px;
            }
            .nav-item.active {
                color: #ff9fb5;
            }
            .main-content {
                height: calc(844px - 44px - 60px - 56px);
                overflow-y: auto;
                padding: 16px;
                background-color: #f9f9f9;
            }
            .card {
                background-color: #ffffff;
                border-radius: 12px;
                padding: 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
                margin-bottom: 16px;
            }
            .card-title {
                font-size: 16px;
                font-weight: 600;
                color: #333;
                margin-bottom: 12px;
                display: flex;
                align-items: center;
            }
            .card-title i {
                margin-right: 8px;
                color: #ff9fb5;
            }
            .tabs {
                display: flex;
                background-color: #f5f5f5;
                border-radius: 8px;
                padding: 4px;
                margin-bottom: 16px;
            }
            .tab {
                flex: 1;
                text-align: center;
                padding: 8px 0;
                font-size: 14px;
                border-radius: 6px;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .tab.active {
                background-color: #fff;
                color: #ff9fb5;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }
            .search-bar {
                display: flex;
                align-items: center;
                background-color: #f5f5f5;
                border-radius: 8px;
                padding: 8px 12px;
                margin-bottom: 16px;
            }
            .search-bar i {
                color: #999;
                margin-right: 8px;
            }
            .search-bar input {
                background-color: transparent;
                border: none;
                outline: none;
                flex: 1;
                font-size: 14px;
                color: #333;
            }
            .recipe-category {
                display: none;
            }
            .recipe-category.active {
                display: block;
            }
            .filter-chips {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
                margin-bottom: 16px;
            }
            .filter-chip {
                display: inline-flex;
                align-items: center;
                padding: 6px 12px;
                background-color: #f0f0f0;
                color: #666;
                border-radius: 16px;
                font-size: 12px;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .filter-chip.active {
                background-color: #ffe1e7;
                color: #ff6d8f;
            }
            .filter-chip i {
                margin-right: 4px;
                font-size: 10px;
            }
            .recipe-grid {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
                margin-bottom: 16px;
            }
            .recipe-card {
                background-color: #ffffff;
                border-radius: 12px;
                overflow: hidden;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            }
            .recipe-image {
                width: 100%;
                height: 120px;
                background-color: #f0f0f0;
                overflow: hidden;
                position: relative;
            }
            .recipe-image img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
            .recipe-favorite {
                position: absolute;
                top: 8px;
                right: 8px;
                width: 28px;
                height: 28px;
                background-color: rgba(255, 255, 255, 0.8);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #ff9fb5;
                cursor: pointer;
            }
            .recipe-info {
                padding: 12px;
            }
            .recipe-title {
                font-weight: 600;
                font-size: 14px;
                color: #333;
                margin-bottom: 6px;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                text-overflow: ellipsis;
                height: 40px;
            }
            .recipe-meta {
                display: flex;
                align-items: center;
                justify-content: space-between;
                font-size: 12px;
                color: #999;
            }
            .recipe-tag {
                display: inline-block;
                padding: 2px 6px;
                background-color: #f9f1f3;
                color: #ff6d8f;
                border-radius: 4px;
                font-size: 10px;
            }
            .recipe-stats {
                display: flex;
                align-items: center;
            }
            .recipe-stat {
                display: flex;
                align-items: center;
                margin-left: 8px;
            }
            .recipe-stat i {
                margin-right: 2px;
                font-size: 10px;
            }
            .section-title {
                font-size: 16px;
                font-weight: 600;
                color: #333;
                margin: 24px 0 12px;
            }
            .banner {
                width: 100%;
                height: 120px;
                background-color: #ffecf0;
                border-radius: 12px;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-bottom: 16px;
                overflow: hidden;
                position: relative;
            }
            .banner img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
            .banner-overlay {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(0, 0, 0, 0.2);
                display: flex;
                align-items: center;
                justify-content: center;
                flex-direction: column;
                color: white;
            }
            .banner-title {
                font-size: 18px;
                font-weight: 600;
                margin-bottom: 6px;
            }
            .banner-subtitle {
                font-size: 12px;
                opacity: 0.8;
            }
            .category-list {
                display: flex;
                overflow-x: auto;
                gap: 12px;
                padding: 4px 0 12px;
                margin-bottom: 16px;
                scrollbar-width: none; /* Firefox */
            }
            .category-list::-webkit-scrollbar {
                display: none; /* Chrome, Safari */
            }
            .category-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                min-width: 64px;
            }
            .category-icon {
                width: 48px;
                height: 48px;
                border-radius: 12px;
                background-color: #ffecf0;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #ff6d8f;
                margin-bottom: 6px;
            }
            .category-name {
                font-size: 12px;
                color: #666;
                text-align: center;
            }
        </style>
    </head>
    <body>
        <div class="device-container">
            <!-- iOS状态栏 -->
            <div class="status-bar">
                <span>9:41</span>
                <div class="flex items-center">
                    <i class="fas fa-signal mr-1"></i>
                    <i class="fas fa-wifi mr-1"></i>
                    <i class="fas fa-battery-full"></i>
                </div>
            </div>

            <!-- 页面头部 -->
            <div class="header">
                <div class="flex items-center">
                    <i class="fas fa-arrow-left mr-4"></i>
                    <h1 class="text-lg font-medium">食谱推荐</h1>
                </div>
                <div class="flex gap-3">
                    <i class="fas fa-share-alt"></i>
                </div>
            </div>

            <!-- 主内容区 -->
            <div class="main-content">
                <!-- 搜索栏 -->
                <div class="search-bar">
                    <i class="fas fa-search"></i>
                    <input type="text" placeholder="搜索食谱、食材或功效" />
                </div>

                <!-- 推荐Banner -->
                <div class="banner">
                    <img src="https://images.pexels.com/photos/1640772/pexels-photo-1640772.jpeg" alt="孕期营养套餐" />
                    <div class="banner-overlay">
                        <div class="banner-title">营养均衡孕期食谱</div>
                        <div class="banner-subtitle">专为孕妈设计的一周营养餐</div>
                    </div>
                </div>

                <!-- 分类选项卡 -->
                <div class="tabs">
                    <div class="tab active" data-target="all">全部</div>
                    <div class="tab" data-target="pregnancy">孕期</div>
                    <div class="tab" data-target="postpartum">产后</div>
                    <div class="tab" data-target="infant">婴儿</div>
                </div>

                <!-- 筛选标签 -->
                <div class="filter-chips">
                    <div class="filter-chip">
                        <i class="fas fa-filter"></i>
                        <span>全部功效</span>
                    </div>
                    <div class="filter-chip active">
                        <i class="fas fa-check"></i>
                        <span>补铁</span>
                    </div>
                    <div class="filter-chip">
                        <span>补钙</span>
                    </div>
                    <div class="filter-chip">
                        <span>补充蛋白质</span>
                    </div>
                    <div class="filter-chip">
                        <span>抗贫血</span>
                    </div>
                </div>

                <!-- 食谱分类快捷入口 -->
                <div class="category-list">
                    <div class="category-item">
                        <div class="category-icon">
                            <i class="fas fa-egg"></i>
                        </div>
                        <div class="category-name">早餐</div>
                    </div>
                    <div class="category-item">
                        <div class="category-icon">
                            <i class="fas fa-drumstick-bite"></i>
                        </div>
                        <div class="category-name">午餐</div>
                    </div>
                    <div class="category-item">
                        <div class="category-icon">
                            <i class="fas fa-utensils"></i>
                        </div>
                        <div class="category-name">晚餐</div>
                    </div>
                    <div class="category-item">
                        <div class="category-icon">
                            <i class="fas fa-cookie"></i>
                        </div>
                        <div class="category-name">点心</div>
                    </div>
                    <div class="category-item">
                        <div class="category-icon">
                            <i class="fas fa-mug-hot"></i>
                        </div>
                        <div class="category-name">汤品</div>
                    </div>
                    <div class="category-item">
                        <div class="category-icon">
                            <i class="fas fa-apple-alt"></i>
                        </div>
                        <div class="category-name">水果</div>
                    </div>
                </div>

                <!-- 全部食谱 -->
                <div class="recipe-category active" id="all">
                    <div class="section-title">推荐食谱</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片1 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1640773/pexels-photo-1640773.jpeg"
                                    alt="菠菜牛肉粥"
                                />
                                <div class="recipe-favorite">
                                    <i class="fas fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">菠菜牛肉粥 - 补铁养血</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补铁</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.2k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>256</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片2 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/6419758/pexels-photo-6419758.jpeg"
                                    alt="蔬菜豆腐汤"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">蔬菜豆腐汤 - 清淡易消化</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补钙</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>987</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>189</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片3 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1435904/pexels-photo-1435904.jpeg"
                                    alt="三文鱼牛油果沙拉"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">三文鱼牛油果沙拉 - 富含Omega-3</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补铁</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>756</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>145</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片4 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/2097090/pexels-photo-2097090.jpeg"
                                    alt="红枣桂圆莲子羹"
                                />
                                <div class="recipe-favorite">
                                    <i class="fas fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">红枣桂圆莲子羹 - 安神补血</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补铁</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.5k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>321</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="section-title">热门食谱</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片5 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1099680/pexels-photo-1099680.jpeg"
                                    alt="蒸蛋"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">西兰花胡萝卜蒸蛋 - 高蛋白低脂</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">蛋白质</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>2.3k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>478</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片6 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1211887/pexels-photo-1211887.jpeg"
                                    alt="坚果酸奶燕麦"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">坚果酸奶燕麦 - 丰富膳食纤维</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补钙</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.8k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>390</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 孕期食谱 -->
                <div class="recipe-category" id="pregnancy">
                    <div class="section-title">孕期营养推荐</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片1 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1640773/pexels-photo-1640773.jpeg"
                                    alt="菠菜牛肉粥"
                                />
                                <div class="recipe-favorite">
                                    <i class="fas fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">菠菜牛肉粥 - 补铁养血</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补铁</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.2k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>256</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片2 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1435904/pexels-photo-1435904.jpeg"
                                    alt="三文鱼牛油果沙拉"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">三文鱼牛油果沙拉 - 富含Omega-3</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补铁</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>756</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>145</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="section-title">孕早期食谱</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片3 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/4198019/pexels-photo-4198019.jpeg"
                                    alt="姜汁红糖水"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">姜汁红糖水 - 缓解孕吐</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">孕早期</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>2.1k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>410</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片4 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1211887/pexels-photo-1211887.jpeg"
                                    alt="坚果酸奶燕麦"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">坚果酸奶燕麦 - 丰富膳食纤维</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补钙</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.8k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>390</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="section-title">孕中期食谱</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片5 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/6419758/pexels-photo-6419758.jpeg"
                                    alt="蔬菜豆腐汤"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">蔬菜豆腐汤 - 清淡易消化</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补钙</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>987</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>189</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片6 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/4553031/pexels-photo-4553031.jpeg"
                                    alt="鸡蛋菠菜饼"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">鸡蛋菠菜饼 - 补充叶酸</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">孕中期</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>765</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>132</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 产后食谱 -->
                <div class="recipe-category" id="postpartum">
                    <div class="section-title">产后恢复推荐</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片1 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/2097090/pexels-photo-2097090.jpeg"
                                    alt="红枣桂圆莲子羹"
                                />
                                <div class="recipe-favorite">
                                    <i class="fas fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">红枣桂圆莲子羹 - 安神补血</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">补铁</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.5k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>321</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片2 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1099680/pexels-photo-1099680.jpeg"
                                    alt="蒸蛋"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">西兰花胡萝卜蒸蛋 - 高蛋白低脂</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">蛋白质</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>2.3k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>478</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="section-title">催乳食谱</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片3 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/1731535/pexels-photo-1731535.jpeg"
                                    alt="猪蹄花生汤"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">猪蹄花生汤 - 产后催乳</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">催乳</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>3.2k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>562</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片4 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/793759/pexels-photo-793759.jpeg"
                                    alt="木瓜鲫鱼汤"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">木瓜鲫鱼汤 - 下奶佳品</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">催乳</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>2.8k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>493</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="section-title">产后恢复食谱</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片5 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/416471/pexels-photo-416471.jpeg"
                                    alt="黑芝麻糊"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">黑芝麻糊 - 补血养发</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">产后恢复</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.7k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>321</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片6 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/764925/pexels-photo-764925.jpeg"
                                    alt="虫草花乌鸡汤"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">虫草花乌鸡汤 - 调理身体</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">产后恢复</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.9k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>287</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 婴儿食谱 -->
                <div class="recipe-category" id="infant">
                    <!-- 此处将在后续完善婴儿食谱内容 -->
                    <div class="section-title">辅食入门（4-6个月）</div>
                    <div class="recipe-grid">
                        <!-- 食谱卡片1 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/4397753/pexels-photo-4397753.jpeg"
                                    alt="苹果米糊"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">苹果米糊 - 宝宝辅食首选</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">4-6个月</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>2.5k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>521</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 食谱卡片2 -->
                        <div class="recipe-card">
                            <div class="recipe-image">
                                <img
                                    src="https://images.pexels.com/photos/5908255/pexels-photo-5908255.jpeg"
                                    alt="胡萝卜泥"
                                />
                                <div class="recipe-favorite">
                                    <i class="far fa-heart"></i>
                                </div>
                            </div>
                            <div class="recipe-info">
                                <div class="recipe-title">胡萝卜泥 - 维生素A补充</div>
                                <div class="recipe-meta">
                                    <div class="recipe-tag">4-6个月</div>
                                    <div class="recipe-stats">
                                        <div class="recipe-stat">
                                            <i class="fas fa-eye"></i>
                                            <span>1.9k</span>
                                        </div>
                                        <div class="recipe-stat">
                                            <i class="fas fa-heart"></i>
                                            <span>432</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 底部导航栏 -->
            <div class="nav-bar">
                <div class="nav-item">
                    <i class="fas fa-home text-xl mb-1"></i>
                    <span>首页</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-calendar-alt text-xl mb-1"></i>
                    <span>日历</span>
                </div>
                <div class="nav-item active">
                    <i class="fas fa-book-medical text-xl mb-1"></i>
                    <span>知识库</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-user text-xl mb-1"></i>
                    <span>我的</span>
                </div>
            </div>
        </div>

        <script>
            document.addEventListener('DOMContentLoaded', function () {
                // 标签切换
                const tabs = document.querySelectorAll('.tab');
                tabs.forEach((tab) => {
                    tab.addEventListener('click', function () {
                        // 移除所有active类
                        tabs.forEach((t) => t.classList.remove('active'));
                        // 给当前点击的tab添加active类
                        this.classList.add('active');

                        // 显示对应的食谱类别内容
                        const target = this.getAttribute('data-target');
                        const categories = document.querySelectorAll('.recipe-category');
                        categories.forEach((category) => {
                            category.classList.remove('active');
                        });
                        document.getElementById(target).classList.add('active');
                    });
                });

                // 筛选标签点击事件
                const filterChips = document.querySelectorAll('.filter-chip');
                filterChips.forEach((chip) => {
                    chip.addEventListener('click', function () {
                        // 如果是全部功效标签，则清除所有其他选中标签
                        if (this.querySelector('span').textContent === '全部功效') {
                            filterChips.forEach((c) => {
                                if (c !== this && c.classList.contains('active')) {
                                    c.classList.remove('active');
                                    if (c.querySelector('i')) {
                                        c.querySelector('i').remove();
                                    }
                                }
                            });
                            this.classList.add('active');
                            if (!this.querySelector('i')) {
                                const icon = document.createElement('i');
                                icon.className = 'fas fa-check';
                                this.prepend(icon);
                            }
                        } else {
                            // 清除"全部功效"的选中状态
                            const allChip = Array.from(filterChips).find(
                                (c) => c.querySelector('span').textContent === '全部功效'
                            );
                            if (allChip && allChip.classList.contains('active')) {
                                allChip.classList.remove('active');
                                if (allChip.querySelector('i.fa-check')) {
                                    allChip.querySelector('i.fa-check').remove();
                                }
                            }

                            // 切换当前标签的选中状态
                            this.classList.toggle('active');
                            if (this.classList.contains('active')) {
                                if (!this.querySelector('i')) {
                                    const icon = document.createElement('i');
                                    icon.className = 'fas fa-check';
                                    this.prepend(icon);
                                }
                            } else {
                                if (this.querySelector('i.fa-check')) {
                                    this.querySelector('i.fa-check').remove();
                                }
                            }

                            // 如果没有任何标签被选中，则自动选中"全部功效"
                            const anyActive = Array.from(filterChips).some(
                                (c) => c !== allChip && c.classList.contains('active')
                            );
                            if (!anyActive && allChip) {
                                allChip.classList.add('active');
                                if (!allChip.querySelector('i.fa-check')) {
                                    const icon = document.createElement('i');
                                    icon.className = 'fas fa-check';
                                    allChip.prepend(icon);
                                }
                            }
                        }
                    });
                });

                // 收藏按钮点击事件
                const favoriteButtons = document.querySelectorAll('.recipe-favorite');
                favoriteButtons.forEach((button) => {
                    button.addEventListener('click', function (e) {
                        e.stopPropagation(); // 阻止冒泡，避免触发卡片点击事件
                        const icon = this.querySelector('i');
                        if (icon.classList.contains('far')) {
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                        } else {
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                        }
                    });
                });

                // 食谱卡片点击事件
                const recipeCards = document.querySelectorAll('.recipe-card');
                recipeCards.forEach((card) => {
                    card.addEventListener('click', function () {
                        const title = this.querySelector('.recipe-title').textContent;
                        console.log(`查看食谱: ${title}`);
                        // 在实际应用中可以跳转到食谱详情页
                    });
                });

                // 食谱分类点击事件
                const categoryItems = document.querySelectorAll('.category-item');
                categoryItems.forEach((item) => {
                    item.addEventListener('click', function () {
                        const categoryName = this.querySelector('.category-name').textContent;
                        console.log(`筛选分类: ${categoryName}`);
                        // 在实际应用中可以根据分类筛选内容
                    });
                });
            });
        </script>
    </body>
</html>
